/*
 * @Author: 黄文杰
 * @Date: 2023-05-04 13:03:05
 * @LastEditors: 黄文杰
 * @LastEditTime: 2023-05-04 13:03:54
 * @FilePath: \ZNDS_V1xx\Bsp_Port\bsp_RingBuffer.h
 * @Description:
 *
 * Copyright (c) 2023 by 航信通科技有限公司, All Rights Reserved.
 */

#ifndef _BSP_RINGBUFFER_H_
#define _BSP_RINGBUFFER_H_

typedef struct
{
    unsigned int RB_Index;
    unsigned int RB_Outdex;
    unsigned int buf_size;
    unsigned int BufEmpty;
    unsigned char *RB_Data;
    unsigned long long timestamp;
} RingBuffer_Typedef;

void RB_WriteByte(RingBuffer_Typedef *Rbuf, unsigned char data);
unsigned int RB_ReadBytes(RingBuffer_Typedef *Rbuf, unsigned char *data, unsigned int Datalen);

#endif
